860D. REMIC defined

(a) General rule. -- For purposes of this title, the terms "real estate mortgage investment conduit" and "REMIC" mean any entity --

(1)	to which an election to be treated as a REMIC applies for the taxable year and all prior taxable years,

(2)	all of the interests in which are regular interests or residual interests,

(3)	which has 1 (and only 1) class of residual interests (and all distributions, if any, with respect to such interests are pro rata),

(4)	as of the close of the 3rd month beginning after the startup day and at all times thereafter, substantially all of the assets of which consist of qualified mortgages and permitted investments,

(5)	which has a taxable year which is a calendar year, and

(6)	with respect to which there are reasonable arrangements designed to ensure that --

(A)	residual interests in such entity are not held by disqualified organizations (as defined in section 860E(e)(5)), and

(B)	information necessary for the application of section 860E(e) will be made available by the entity.

In the case of a qualified liquidation (as defined in section 860F(a)(4)(A)), paragraph (4) shall not apply during the liquidation period (as defined in section 860F(a)(4)(A)), paragraph (4) shall not apply during the liquidation period (as defined in section 860F(a)(4)(B)).

(b)	Election. --

(1)	In general. -- An entity (otherwise meeting the requirements of subsection (a)) may elect to be treated as a REMIC for its 1st taxable year. Such an election shall be made on its return for such 1st taxable year. Except as provided in paragraph (2), such an election shall apply to the taxable year for which made and all subsequent taxable years.

(2)	Termination. --

(A)	In general. -- If any entity ceases to be a REMIC at any time during the taxable year, such entity shall not be treated as a REMIC for such taxable year or any succeeding taxable year.

(B)	Inadvertent terminations. -- If --

(i)	an entity ceases to be a REMIC,

(ii)	the Secretary determines that such cessation was inadvertent,

(iii) no later than a reasonable time after the discovery of the event resulting in such cessation, steps are taken so that such entity is once more a REMIC, and

(iv)	such entity, and each person holding an interest in such entity at any time during the period specified pursuant to this subsection, agrees to make such adjustments (consistent with the treatment of such entity as a REMIC or a C corporation) as may be required by the Secretary with respect to such period,

then, notwithstanding such terminating event, such entity shall be treated as continuing to be a REMIC (or such cessation shall be disregarded for purposes of subparagraph (A)) whichever the Secretary determines to be appropriate.

860E. Treatment of income in excess of daily accruals on residual interests

(a)	Excess inclusions may not be offset by net operating losses. --

(1)	In general. -- Except as provided in paragraph (2), the taxable income of any holder of a residual interest in a REMIC for any taxable year shall in no event be less than the excess inclusion for such taxable year.

(2)	Exception for certain financial institutions. -- Paragraph (1) shall not apply to any organization to which section 593 applies. The Secretary may by regulations provide that the preceding sentence shall not apply where necessary or appropriate to prevent avoidance of tax imposed by this chapter.

(3)	Special rule for affiliated groups. -- All members of an affiliated group filing a consolidated return shall be treated as 1 taxpayer for purposes of this subsection, except that paragraph (2) shall be applied separately with respect to each corporation which is a member of such group and to which section 593 applies.

(4)	Treatment of certain subsidiaries. --

(A)	In general. -- For purposes of this subsection, a corporation to which section 593 applies and each qualified subsidiary of such corporation shall be treated as a single corporation to which section 593 applies.

(B)	Qualified subsidiary. -- For purposes of this subsection, the term "qualified subsidiary" means any corporation --

(i)	all the stock of which, and substantially all the indebtedness of which, is held directly by the corporation to which section 593 applies, and

(ii)	which is organized and operated exclusively in connection with the organization and operation of 1 or more REMIC's.

(5)	Coordination with section 172. -- Any excess inclusion for any taxable year shall not be taken into account --

(A)	in determining under section 172 the amount of any net operating loss for such taxable year, and

(B)	in determining taxable income for such taxable year for purposes of the 2nd sentence of section 172(b)(2).

(b)	Organizations subject to unrelated business tax. -- If the holder of any residual interest in a REMIC is an organization subject to the tax imposed by section 511, the excess inclusion of such holder for any taxable year shall be treated as unrelated business taxable income of such holder for purposes of section 511.

(c)	Excess inclusion. -- For purposes of this section --

(1)	In general. -- The term "excess inclusion" means, with respect to any residual interest in a REMIC for any calendar quarter, the excess (if any) of --

(A)	the amount taken into account with respect to such interest by the holder under section 860C(a), over

(B)	the sum of the daily accruals with respect to such interest for days during such calendar quarter while held by such holder.

To the extent provided in regulations, if residual interests in a REMIC do not have significant value, the excess inclusions with respect to such interests shall be the amount determined under subparagraph (A) without regard to subparagraph (B).

(2)	Determination of daily accruals. --

(A)	In general. -- For purposes of this subsection, the daily accrual with respect to any residual interest for any day in any calendar quarter shall be determined by allocating to each day in such quarter its retable portion of the product of --

(i)	the adjusted issue price of such interest at the beginning of such quarter, and

(ii)	120 percent of the long-term Federal rate (determined on the basis of compounding at the close of each calendar quarter and properly adjusted for the length of such quarter).

(B)	Adjusted issue price. -- For purposes of this paragraph, the adjusted issue price of any residual interest at the beginning of any calendar quarter is the issue price of the residual interest (adjusted for contributions) --

(i)	increased by the amount of daily accruals for prior quarters, and

(ii)	decreased (but not below zero) by and distribution made with respect to such interest before the beginning of such quarter.

(C)	Federal long-term rate. -- For purposes of this paragraph, the term "Federal long-term rate" means the Federal long-term rate which would have applied to the residual interest under section 1274(d) (determined without regard to paragraph (2) thereof) if it were a debt instrument.

(d)	Treatment of residual interests held by real estate investment trusts. -- If a residual interest in a REMIC is held by a real estate investment trust, under regulations prescribed by the Secretary --

(1)	any excess of --

(A)	the aggregate excess inclusions determined with respect to such interests, over

(B)	the real estate investment trust taxable income (within the meaning of section 857(b)(2), excluding any net capital gain),

shall be allocated among the shareholders of such trust in proportion to the dividends received by such shareholders from such trust, and

(2)	any amount allocated to a shareholder under paragraph (1) shall be treated as an excess inclusion with respect to a residual interest held by such shareholder.

Rules similar to the rules of the preceding sentence shall apply also in the case of regulated investment companies, common trust funds, and organizations to which part I of subchapter T applies.

(e)	Tax on transfers of residual interests to certain organizations, etc. --

(1)	In general. -- A tax is hereby imposed on any transfer of a residual interest in a REMIC to a disqualified organization.

(2)	Amount of tax. -- The amount of the tax imposed by paragraph (1) on any transfer of a residual interest shall be equal to the product of --

(A)	the amount (determined under regulations) equal to the present value of the total anticipated excess inclusions with respect to such interest for periods after such transfer, multiplied by

(B)	the highest rate of tax specified in section 11(b)(1).

(3)	Liability. -- The tax imposed by paragraph (1) on any transfer shall be paid by the transferor; except that, where such transfer is through an agent for a disqualified organization, such tax shall be paid by such agent.

(4)	Transferee furnishes affidavit. -- The person (otherwise liable for any tax imposed by paragraph (1)) shall be relieved of liability for the tax imposed by paragraph (1) with respect to any transfer it --

(A)	the transferee furnishes to such person an affidavit that the transferee is not a disqualified organization, and

(B)	as of the time of the transfer, such person does not have actual knowledge that such affidavit is false.

(5)	Disqualified organization. -- For purposes of this section, the term "disqualified organization" means --

(A)	the United States, any State or political subdivision thereof, any foreign government, any international organization, or any agency or instrumentality of any of the foregoing.

(B)	any organization (other than a cooperative described in section 521) which is exempt from tax imposed by this chapter unless such organization is subject to the tax imposed by section 511, and

(C)	any organization described in section 1381(a)(2)(C).

For purposes of subparagraph (A), the rules of section 168(h)(2)(D) (relating to treatment of certain taxable instrumentalities) shall apply; except that, in the case of the Federal Home Loan Mortgage Corporation, clause (ii) of such section shall not apply.

(6)	Treatment of pass-thru entities. --

(A)	Imposition of tax. -- If, at any time during any taxable year of a pass-thru entity, a disqualified organization is the record holder of an interest in such entity, there is hereby imposed on such entity for such taxable year a tax equal to the product of --

(i)	the amount of excess inclusions for such taxable year allocable to the interest held by such disqualified organization, multiplied by

(ii)	the highest rate of tax specified in section 11(b)(1).

(B)	Pass-thru entity. -- For purposes of this paragraph, the term "pass-thru entity" means--

(i)	any regulated investment company, real estate investment trust, or common trust fund,

(ii)	any partnership, trust, or estate, and

(iii) any organization to which part I of subchapter T applies.

Except as provided in regulations, a person holding an interest in a pass-thru entity as a nominee for another person shall, with respect to such interest, be treated as a pass-thru entity.

(C)	Tax to be deductible. -- Any tax imposed by this paragraph with respect to any excess inclusion of any pass-thru entity for any taxable year shall, for purposes of this title (other than this subsection), be applied against (and operate to reduce) the amount included in gross income with respect to the residual interest involved.

(D)	Exception where holder furnishes affidavit. -- Not tax shall be imposed by subparagraph (A) with respect to any interest in a pass-thru entity for any period if --

(i)	the record holder of such interest furnishes to such pass-thru entity an affidavit that such record holder is not a disqualified organization, and

(ii)	during such period, the pass-thru entity does not have actual knowledge that such affidavit is false.

(7)	Waiver. -- The Secretary may waive the tax imposed by paragraph (1) on any transfer if --

(A)	within a reasonable time after discovery that the transfer was subject to tax under paragraph (1), steps are taken so that the interest is no longer held by the disqualified organization, and

(B)	there is paid to the Secretary such amounts as the Secretary may require.

(8)	Administrative provisions. -- For purposes of subtitle F, the taxes imposed by this subsection shall be treated as excise taxes with respect to which the deficiency procedures of such subtitle apply.

(f)	Treatment of variable insurance contracts. -- Except as provided in regulations, with respect to any variable contract (as defined in section 817), there shall be no adjustment in the reserve to the extent of any excess inclusion.

860F. Other rules

(a)	100 percent tax on prohibited transactions. --

(1)	Tax imposed. -- There is hereby imposed for each taxable year of REMIC a tax equal to 100 percent of the net income derived from prohibited transactions.

(2)	Prohibited transaction. -- For purposes of this part, the term "prohibited transaction" means --

(A)	Disposition of qualified mortgage. -- The disposition of any qualified mortgage transferred to the REMIC other than a disposition pursuant to --

(i)	the substitution of a qualified replacement mortgage for a qualified mortgage (or the repurchase in lieu of substitution of a defective obligation),

(ii)	a disposition incident to the foreclosure, default, or imminent default of the mortgage.

(iii) the bankruptcy or insolvency of the REMIC, or

(iv)	a qualified liquidation.

(B)	Income from non permitted assets. -- The receipt of any income attributable to any asset which is neither a qualified mortgage nor a permitted investment.

(C)	Compensation for services. -- The receipt by the REMIC of any amount representing a fee or other compensation for services.

(D)	Gain from disposition of cash flow investments. -- Gain from the disposition of any cash flow investment other than pursuant to any qualified liquidation.

(3)	Determination of net income. -- For purposes of paragraph (1), the term "net income derived from prohibited transactions" means the excess of the gross income from prohibited transactions over the deductions allowed by this chapter which are directly connected with such transactions; except that there shall not be taken into account any item attributable to any prohibited transaction for which there was a loss.

(4)	Qualified liquidation. -- For purposes of this part --

(A)	In general. -- The term "qualified liquidation" means a transaction in which --

(i)	the REMIC adopts a plan of complete liquidation,

(ii)	such REMIC sells all its assets (other than cash) within the liquidation period, and

(iii) all proceeds of the liquidation (plus the cash), less assets retained to meet claims, are credited or distributed to holder of regular or residual interests on or before the last day of the liquidation period.

(B)	Liquidation period. -- The term "liquidation period" means the period --

(i)	beginning on the date of the adoption of the plan of liquidation, and

(ii)	ending at the close of the 90th day after such date.

(5)	Exceptions. -- Notwithstanding subparagraphs (A) and (D) of paragraph (1), the term "prohibited transaction" shall not include any disposition --

(A)	required to prevent default on a regular interest where the threatened default resulted from a default on 1 or more qualified mortgages, or

(B)	to facilitate a clean-up call (as defined in regulations).

(b)	Treatment of transfers to the REMIC. --

(1)	Treatment of transferor. --

(A)	Nonrecognition gain or loss. -- No gain or loss shall be recognized to the transferor on the transfer of any property to a REMIC in exchange for regular or residual interests in such REMIC.

(B)	Adjusted bases of interest. -- The adjusted bases of the regular and residual interests received in a transfer described in subparagraph (A) shall be equal to the aggregate adjusted bases of the property transferred in such transfer. Such amount shall be allocated among such interests in proportion to their respective fair market values.

(C)	Treatment of nonrecognized gain. -- If the issue price of any regular or residual interest exceeds its adjusted basis as determined under subparagraph (B), for periods during which such interest is held by the transferor (or by any other person whose basis is determined in whole or in part by reference to the basis of such interest in the hand of the transferor) --

(i)	in the case of a regular interest, such excess shall be included in gross income (as determined under rules similar to rules of section 1276(b)), and

(ii)	in the case of a residual interest such excess shall be included in gross income ratably over the anticipated period during which the REMIC will be in existence.

(D)	Treatment of nonrecognized loss. -- If the adjusted basis of any regular or residual interest received in a transfer described in subparagraph (A) exceeds its issue price, for periods during which such interest is held by the transferor (or by any other person whose basis is determined in whole or in part by reference to the basis of such interest in the hand of the transferor) --

(i)	in the case of a regular interest, such excess shall be allowable as a deduction under rules similar to the rules of section 171, and

(ii)	in the case of a residual interest, such excess shall be allowable as a deduction ratably over the anticipated period during which the REMIC will be in existence.

(2)	Basis to REMIC. -- The basis of any property received by a REMIC in a transfer described in paragraph (1)(A) shall be its fair market value immediately after such transfer.

(c)	Distributions of property. -- If a REMIC makes a distribution of property with respect to any regular or residual interest --

(1)	notwithstanding any other provision of this subtitle, gain shall be recognized to such REMIC on the distribution in the same manner as if it had sold such property to the distributee at its fair market value, and

(2)	the basis of the distributee in such property shall be its fair market value.

(d)	Coordination with wash sale rules. -- For purposes of section 1091 --

(1)	any residual interest in a REMIC shall be treated as a security, and

(2)	in applying such section to any loss claimed to have been sustained on the sale or other disposition of a residual interest in a REMIC --

(A)	except as provided in regulations, any residual interest in any REMIC and any interest in a taxable mortgage pool (as defined in section 7701(i)) comparable to a residual interest in a REMIC shall be treated as substantially identical stock or securities, and

(B)	subsections (a) and (e) of such section shall be applied by substituting "6 months" for "30 days" each place it appears.

(e)	Treatment under subtitle F. -- For purposes of subtitle F, a REMIC shall be treated as a partnership (and holders of residual interests in such REMIC shall be treated as partners). Any return required by reason of the preceding sentence shall include the amount of the daily accruals determined under section 860E(c). Such return shall be filed by the REMIC. The determination of who may sign such return shall be made without regard to the first sentence of this subsection.

860G. Other definitions and special rules

(a)	Definitions. -- For purposes of this part --

(1)	Regular interest. -- The term "regular interest" means any interest in REMIC which is issued on the startup day with fixed terms and which designated as a regular interest if --

(A)	such interest unconditionally entitles the holder to receive a specified principal amount (or other similar amount), and

(B)	interest payments (or other similar amount), if any, with respect to such interest at or before maturity --

(i)	are payable based on a fixed rate (or to the extent provided in regulations, at a variable rate), or

(ii)	consist of a specified portion of the interest payments on qualified mortgages and such portion does not vary during the period such interest is outstanding.

The interest shall not fail to meet the requirements of subparagraph (A) merely because the timing (but not the amount) of the principal payments (or other similar amounts) may be contingent on the extent of prepayments on qualified mortgages and the amount of income from permitted investments.

(2)	Residual interest. -- The term "residual interest" means an interest in a REMIC which is issues on the startup day, which is not a regular interest, and which is designated as a residual interest.

(3)	Qualified mortgage. -- The term "qualified mortgage" means --

(A)	any obligation (including any participation or certificate of beneficial ownership therein) which is principally secured by an interest in real property and which --

(i)	is transferred to the REMIC on the startup day in exchange for regular or residual interests in the REMIC, or

(ii)	is purchased by the REMIC within the 3-month period beginning on the startup day if, except as provided in regulations, such purchase is pursuant to a fixed-price contract in effect on the startup day,

(B)	any qualified replacement mortgage, and

(C)	any regular interest in another REMIC transferred to the REMIC on the startup day in exchange for regular or residual interests in the REMIC.

For purposes of subparagraph (A), any obligation secured by stock held by a person as a tenant-stockholder (as defined in section 216) in a cooperative housing corporation (as so defined) shall be treated as secured by an interest in real property.

(4)	Qualified replacement mortgage. -- The term "qualified replacement mortgage" means any obligation --

(A)	which would be a qualified mortgage if transferred on the startup day in exchange for regular or residual interests in the REMIC, and

(B)	which is received for --

(i)	another obligation within the 3-month period beginning on the startup day, or

(ii)	a defective obligation within the 2-year period beginning on the startup day.

(5)	Permitted investments. -- The term "permitted investments" means any --

(A)	cash flow investment,

(B)	qualified reserve asset, or

(C)	foreclosure property,

(6)	Cash flow investment. -- The term "cash flow investment" means any investment of amounts received under qualified mortgages for a temporary period before distribution to holders of interests in the REMIC.

(7)	Qualified reserve asset. --

(A)	In general. -- The term "qualified reserve asset" means any intangible property which is held for investment and as part of a qualified reserve fund.

(B)	Qualified reserve fund. -- For purposes of subparagraph (A), the term "qualified reserve fund" means any reasonably required reserve to provide for full payment of expenses of the REMIC or amounts due on regular interests in the event of defaults on qualified mortgages or lower than expected returns on cash flow investments. The amount of any such reserve shall be promptly and appropriately reduced as payments of qualified mortgages are received.

(C)	Special rule. -- A reserve shall not be treated as a qualified reserve for any taxable year (and all subsequent taxable

years) if more than 30 percent of the gross income from the assets in such fund for the taxable year is derived from the sale or other disposition of property held for less than 3 months. For purposes of the preceding sentence, gain on the disposition of a qualified reserve asset shall not be taken into account if the disposition giving rise to such gain is required to prevent default on a regular interest where the threatened default resulted from a default on 1 or more qualified mortgages.

(8)	Foreclosure property. -- The term "foreclosure property" means property --

(A)	which would be foreclosure property under section 856(e) (without regard to paragraph (5) thereof) if acquired by a real estate investment trust, and

(B)	which is acquired in connection with the default or imminent default of a qualified mortgage held by the REMIC.

Solely for purposes of section 860D(a), the determination of whether any property is foreclosure property shall be made without regard to section 856(e)(4).

(9)	Startup day. -- The term "startup day" means the day on which the REMIC issues all of its regular and residual interests. To the extent provided in regulations, all interests issued (and all transfers to the REMIC) during any period (not exceeding 10 days) permitted in such regulations shall be treated as occurring on the day during such period selected by the REMIC for purposes of this paragraph.

(10)	Issue price. -- The issue price of any regular or residual interest in a REMIC shall be determined under section 1273(b) in the same manner as if such interest were a debt instrument; except that if the interest is issued for property, paragraph (3) of section 1273(b) shall apply whether or not the requirements of such paragraph are met.

(b)	Treatment of nonresident aliens and foreign corporations. -- If the holder of a residual interest in a REMIC is a nonresident alien individual or a foreign corporation, for purposes of sections 871(a), 881, 1441, and 1442 --

(1)	amounts includible in the gross income of such holder under this part shall be taken into account when paid or distributed (or when the interest is disposed of), and

(2)	no exemption from the taxes imposed by such sections (and no reduction in the rates of such taxes) shall apply to any excess inclusion.

The Secretary may by regulations provide that such amounts shall be taken into account earlier than as provided in paragraph (1) where necessary or appropriate to prevent the avoidance of tax imposed by this chapter.

(c)	Tax on income from foreclosure property. --

(1)	In general. -- A tax is hereby imposed for each taxable year on the net income from foreclosure property of each REMIC. Such tax shall be computed by multiplying the net income from foreclosure property by the highest rate of tax specified in section 11(b).

(2)	Net income from foreclosure property. -- For purposes of this part, the term "net income from foreclosure property" means the amount which would be the REMIC's net income from foreclosure property under section 857(b)(4)(B) if the REMIC were a real estate investment trust.

(d)	Tax on contributions after startup date. --

(1)	In general. -- Except as provided in paragraph (2), if any amount is contributed to a REMIC after the startup day, there is hereby imposed a tax for the taxable year of the REMIC in which the contribution is received equal to 100 percent of the amount of such contribution.

(2)	Exceptions. -- Paragraph (1) shall not apply to any contribution which is made in cash and is described in any of the following subparagraphs:

(A)	Any contribution to facilitate a clean-up call (as defined in regulations) or a qualified liquidation.

(B)	Any payment in the nature of a guarantee.

(C)	Any contribution during the 3-month period beginning on the startup day.

(D)	Any contribution to a qualified reserve fund by any holder of a residual interest in the REMIC.

(E)	Any other contribution permitted in regulations.

(e)	Regulations. -- The Secretary shall prescribe such regulations as may be necessary or appropriate to carry out the purposes of this part, including regulations --

(1)	to prevent unreasonable accumulations of assets in a REMIC,

(2)	permitting determinations of the fair market value of property transferred to a REMIC and issue price of interests in a REMIC to be made earlier than otherwise provided,

(3)	requiring reporting to holders of residual interests of such information as frequently as is necessary or appropriate to permit such holders to compute their taxable income accurately.

(4)	providing appropriate rules for treatment of transfers of qualified replacement mortgage only if it is part of a bona fide replacement (and not part of a swap of mortgages).

861.	Income from sources within the United States

(a)	Gross income from sources within United States. -- The following items of gross income shall be treated as income from sources within the United States:

(1)	Interest. -- Interest from the United States or the District of Columbia, and interest on bonds, notes, or other interest-bearing obligations of noncorporate residents or domestic corporations, not including --

(A)	interest from a resident alien individual or domestic corporation, if such individual or corporation meets the 80-percent foreign business requirements of subsection (c)(1), and

(B)	interest --

(i)	on deposits with a foreign branch of a domestic corporation or a domestic partnership if such branch is engaged in the commercial banking business, and

(ii)	on amounts satisfying the requirements of subparagraph (B) of section 871(i)(3) which are paid by a foreign branch of a domestic corporation or a domestic partnership.

(2)	Dividends. -- The amount received as dividends --

(A)	from a domestic corporation other than a corporation which has an election in effect under section 936, or

(B)	from a foreign corporation unless less than 25 percent of the gross income from all sources of such foreign corporation for the 3-year period ending with the close of its taxable year preceding the declaration of such dividends (or for such part of such period as the corporation has been in existence) was effectively connected (or treated as effectively connected other than income described in section 884(d)(2)) with the conduct of a trade or business within the United States; but only in an amount which bears the same ratio to such dividends as the gross income of the corporation for such period which was effectively connected (or treated as effectively connected other than income described in section 884(d)(2)) with the conduct of a trade or business within the United States bears to its gross income from all sources; but dividends (other than dividends for which a deduction is allowable under section 245(b)) from a foreign corporation shall, for purposes of subpart A of part III (relating to foreign tax credit), be treated as income from sources without the United States to the extent (and only to the extent) exceeding the amount which is 100/70th of the amount of the deduction allowable under section 245 in respect of such dividends, or

(C)	from a foreign corporation to the extent that such amount is required by section 243(e) (relating to certain dividends from foreign corporations) to be treated as dividends from a domestic corporation which is subject to taxation under this chapter, and to such extent subparagraph (B) shall not apply to such amount, or

(D)	from a DISC or former DISC (as defined in section 992(a)) except to the extent attributable (as determined under regulations prescribed by the Secretary) to qualified export receipts described in section 993(a)(1) (other than interest and gains described in section 995(b)(1)).

In the case of any dividend from a 20-percent owned corporation (as defined in section 243(c)(2)), subparagraph (B) shall be applied by substituting "100/80th" for "100/70th".

(3)	Personal services. -- Compensation for labor or personal services performed in the United States; except that compensation for labor or services performed in the United States shall not be deemed to be income from sources within the United States if --

(A)	the labor or services are performed by a nonresident alien individual temporarily present in the United States for a period or periods not exceeding a total of 90 days during the taxable year,

(B)	such compensation does not exceed $3,000 in the aggregate, and

(C)	the compensation is for labor or services performed as an employee of or under a contract with --

(i)	a nonresident alien, foreign partnership, or foreign corporation, not engaged in trade or business within the United States, or

(ii)	an individual who is a citizen or resident of the United States, a domestic partnership, or a domestic corporation, if such labor or services are performed for an office or place of business maintained in a foreign country or in a possession of the United States by such individual, partnership, or corporation.

(4)	Rentals and royalties. -- Rentals or royalties from property located in the United States or from any interest in such property, including rentals or royalties for the use of or for the privilege of using in the United States patents, copyrights, secret processes and formulas, good will, trade-marks, trade brands, franchises, and other like property.

(5)	Disposition of United States real property interest. -- Gains, profits, and income from the disposition of a United States real property (as defined in section 897(c)).

(6)	Sale or exchange of inventory property. -- Gains, profits, and income derived from the purchase of inventory property (within the meaning of section 865(i)(1) without the United States (other than within a possession of the United States) and its sale or exchange within the United States.

(7)	Amounts received as underwriting income (as defined in section 832(b)(3)) derived from the issuing (or reinsuring) of any insurance or annuity contract --

(A)	in connection with property in, liability arising out of an activity in, or in connection with the lives or health of residents of, the United States, or

(B)	in connection with risks not described in subparagraph (A) as a result of any arrangement whereby another corporation receives a substantially equal amount of premiums or other consideration in respect to issuing (or reinsuring) any insurance or annuity contract in connection with property in, liability arising out of activity in, or in connection with the lives or health of residents of, the United States.

(8)	Social Security Benefits. -- Any social security benefit (as defined in section 86(d)).

(b)	Taxable income from sources within United States. -- From the items of gross income specified in subsection (a) as being income from sources within the United States there shall be deducted the expenses, losses, and other deductions properly apportioned or allocated thereto and a ratable part of any expenses, losses, or other deductions which cannot definitely be allocated to some item or class of gross income. The remainder, if any, shall be included in full as taxable income from sources within the United States. In the case of an individual who does not itemize deductions, an amount equal to the standard deduction shall be considered a deduction which cannot definitely be allocated to some item or class of gross income.

(c)	Foreign business requirements. --

(1)	Foreign business requirements. --

(A)	In general. -- An individual or corporation meets the 80-percent foreign business requirements of this paragraph if it is shown to the satisfaction of the Secretary that at least 80 percent of the gross income from all sources of such individual or corporation for the testing period is active foreign business income.

(B)	Active foreign business income. -- For purposes of subparagraph (A), the term "active foreign business income" means gross income which --

(i)	is derived from sources outside the United States (as determined under this subchapter) or, in the case of a corporation, is attributable to income so divided by a subsidiary of such corporation, and

(ii)	is attributable to the active conduct of a trade or business in a foreign country or possession of the United States by the individual or corporation (or by a subsidiary).

For purposes of this subparagraph, the term "subsidiary" means any corporation in which the corporation referred to in this subparagraph owns (directly or indirectly) stock meeting the requirements of section 1504(a)(2) (determined by substituting "50 percent" for "80 percent" each place it appears).

(C)	Testing period. -- For purposes of this subsection, the term "testing period" means the 3-year period ending with the close of the taxable year of the individual or corporation preceding the payment (or such part of such period as may be applicable). If the individual or corporation has no gross income for such 3-year period (or part thereof), the testing period shall be the taxable year in which the payment is made.

(2)	Look-thru where related person receives interest. --

(A)	In general. -- In the case of interest received by a related person from a resident alien individual or domestic corporation meeting the 80-percent foreign business requirements of paragraph (1), subsection (a)(1)(A) shall apply only to a percentage of such interest equal to the percentage which --

(i)	the gross income of such individual or corporation for the testing period from sources outside the United States (as determined under this subchapter), is of

(ii)	the total gross income of such individual or corporation for the testing period.

(B)	Related person. -- For purposes of this paragraph, the term "related person" has the meaning given such term by section 954(d)(3), except that --

(i)	such section shall be applied by substituting "the individual or corporation making the payment" for "controlled foreign corporation" each place it appears, and

(ii)	such section shall be applied by substituting "10 percent or more" for "more than 50 percent" each place it appears.

(d)	Special rule for application of subsection (a)(2)(B). -- For purposes of subsection (a)(2)(B), if the foreign corporation has no gross income from any source for the 3-year period (or part thereof) specified, the requirements of such subsection shall be applied with respect to the taxable year of such corporation in which the payment of the dividend is made.

(e)	Income from certain railroad rolling stock treated as income from sources within the United States. --

(1)	General rule. -- For purposes of subsection (a) and section 862(a), if --

(A)	a taxpayer leases railroad rolling stock which is section 1245 property (as defined in section 1245(a)(3) to a domestic common carrier by railroad or a corporation which is controlled, directly or indirectly, by one or more such common carries, and

(B)	the use under such lease is expected to be use within the United States,

all amounts includible in gross income by the taxpayer with respect to such railroad rolling stock (including gain from sale or other disposition of such railroad rolling stock) shall be treated as income from sources within the United States. The requirements of subparagraph (B) of the preceding sentence shall be treated as satisfied if the only expected use outside the United States is use by a person (whether or not a United States person) in Canada or Mexico on a temporary basis which is not expected to exceed a total of 90 days in any taxable year.

(2)	Paragraph (1) not to apply where lessor is a member of controlled group which includes a railroad. -- Paragraph (1) shall not apply to a lease between two members of the same controlled group of corporations (as defined in section 1563) if any member of such group is a domestic common carrier by railroad or a switching or terminal company all of whose stock is owned by one or more domestic common carriers by railroad.

(3)	Denial of foreign tax credit. -- No credit shall be allowed under section 901 for any payments to foreign countries with respect to any amount received by the taxpayer with respect to railroad rolling stock which is subject to paragraph (1).

(f)	Cross reference. --

For treatment of interest paid by the branch of a foreign corporation, see section 884(f).